home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XChangeKeyboardMapping.z / XChangeKeyboardMapping
Encoding:
Text File  |  1998-10-30  |  16.1 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XChangeKeyboardMapping, XGetKeyboardMapping,
  10.           XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping,
  11.           XNewModifiermap, XInsertModifiermapEntry,
  12.           XDeleteModifiermapEntry, XFreeModifierMap XModifierKeymap -
  13.           manipulate keyboard encoding and keyboard encoding structure
  14.  
  15.      SSSSYYYYNNNNTTTTAAAAXXXX
  16.           XChangeKeyboardMapping(_d_i_s_p_l_a_y, _f_i_r_s_t__k_e_y_c_o_d_e,
  17.           _k_e_y_s_y_m_s__p_e_r__k_e_y_c_o_d_e, _k_e_y_s_y_m_s, _n_u_m__c_o_d_e_s)
  18.                 Display *_d_i_s_p_l_a_y;
  19.                 int _f_i_r_s_t__k_e_y_c_o_d_e;
  20.                 int _k_e_y_s_y_m_s__p_e_r__k_e_y_c_o_d_e;
  21.                 KeySym *_k_e_y_s_y_m_s;
  22.                 int _n_u_m__c_o_d_e_s;
  23.  
  24.           KeySym *XGetKeyboardMapping(_d_i_s_p_l_a_y, _f_i_r_s_t__k_e_y_c_o_d_e,
  25.           _k_e_y_c_o_d_e__c_o_u_n_t,
  26.                                       _k_e_y_s_y_m_s__p_e_r__k_e_y_c_o_d_e__r_e_t_u_r_n)
  27.                 Display *_d_i_s_p_l_a_y;
  28.                 KeyCode _f_i_r_s_t__k_e_y_c_o_d_e;
  29.                 int _k_e_y_c_o_d_e__c_o_u_n_t;
  30.                 int *_k_e_y_s_y_m_s__p_e_r__k_e_y_c_o_d_e__r_e_t_u_r_n;
  31.  
  32.           XDisplayKeycodes(_d_i_s_p_l_a_y, _m_i_n__k_e_y_c_o_d_e_s__r_e_t_u_r_n,
  33.           _m_a_x__k_e_y_c_o_d_e_s__r_e_t_u_r_n)
  34.                   Display *_d_i_s_p_l_a_y;
  35.                   int *_m_i_n__k_e_y_c_o_d_e_s__r_e_t_u_r_n, *_m_a_x__k_e_y_c_o_d_e_s__r_e_t_u_r_n;
  36.  
  37.           int XSetModifierMapping(_d_i_s_p_l_a_y, _m_o_d_m_a_p)
  38.                   Display *_d_i_s_p_l_a_y;
  39.                   XModifierKeymap *_m_o_d_m_a_p;
  40.  
  41.           XModifierKeymap *XGetModifierMapping(_d_i_s_p_l_a_y)
  42.                 Display *_d_i_s_p_l_a_y;
  43.  
  44.  
  45.           XModifierKeymap *XNewModifiermap(_m_a_x__k_e_y_s__p_e_r__m_o_d)
  46.                   int _m_a_x__k_e_y_s__p_e_r__m_o_d;
  47.  
  48.           XModifierKeymap *XInsertModifiermapEntry(_m_o_d_m_a_p,
  49.           _k_e_y_c_o_d_e__e_n_t_r_y, _m_o_d_i_f_i_e_r)
  50.                XModifierKeymap *_m_o_d_m_a_p;
  51.                KeyCode _k_e_y_c_o_d_e__e_n_t_r_y;
  52.                int _m_o_d_i_f_i_e_r;
  53.  
  54.           XModifierKeymap *XDeleteModifiermapEntry(_m_o_d_m_a_p,
  55.           _k_e_y_c_o_d_e__e_n_t_r_y, _m_o_d_i_f_i_e_r)
  56.                XModifierKeymap *_m_o_d_m_a_p;
  57.                KeyCode _k_e_y_c_o_d_e__e_n_t_r_y;
  58.                int _m_o_d_i_f_i_e_r;
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           XFreeModifiermap(_m_o_d_m_a_p)
  75.                   XModifierKeymap *_m_o_d_m_a_p;
  76.  
  77.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  78.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  79.  
  80.           _f_i_r_s_t__k_e_y_c_o_d_e
  81.                     Specifies the first KeyCode that is to be changed
  82.                     or returned.
  83.  
  84.           _k_e_y_c_o_d_e__c_o_u_n_t
  85.                     Specifies the number of KeyCodes that are to be
  86.                     returned.
  87.  
  88.           _k_e_y_c_o_d_e__e_n_t_r_y
  89.                     Specifies the KeyCode.
  90.  
  91.           _k_e_y_s_y_m_s   Specifies an array of KeySyms.
  92.  
  93.           _k_e_y_s_y_m_s__p_e_r__k_e_y_c_o_d_e
  94.                     Specifies the number of KeySyms per KeyCode.
  95.  
  96.           _k_e_y_s_y_m_s__p_e_r__k_e_y_c_o_d_e__r_e_t_u_r_n
  97.                     Returns the number of KeySyms per KeyCode.
  98.  
  99.           _m_a_x__k_e_y_s__p_e_r__m_o_d
  100.                     Specifies the number of KeyCode entries
  101.                     preallocated to the modifiers in the map.
  102.  
  103.           _m_a_x__k_e_y_c_o_d_e_s__r_e_t_u_r_n
  104.                     Returns the maximum number of KeyCodes.
  105.  
  106.           _m_i_n__k_e_y_c_o_d_e_s__r_e_t_u_r_n
  107.                     Returns the minimum number of KeyCodes.
  108.  
  109.           _m_o_d_i_f_i_e_r  Specifies the modifier.
  110.  
  111.           _m_o_d_m_a_p    Specifies the _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure.
  112.  
  113.           _n_u_m__c_o_d_e_s Specifies the number of KeyCodes that are to be
  114.                     changed.
  115.  
  116.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  117.           The _X_C_h_a_n_g_e_K_e_y_b_o_a_r_d_M_a_p_p_i_n_g function defines the symbols for
  118.           the specified number of KeyCodes starting with
  119.           first_keycode.  The symbols for KeyCodes outside this range
  120.           remain unchanged. The number of elements in keysyms must be:
  121.  
  122.           num_codes * keysyms_per_keycode
  123.  
  124.           The specified first_keycode must be greater than or equal to
  125.           min_keycode returned by _X_D_i_s_p_l_a_y_K_e_y_c_o_d_e_s, or a _B_a_d_V_a_l_u_e
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           error results.  In addition, the following expression must
  141.           be less than or equal to max_keycode as returned by
  142.           _X_D_i_s_p_l_a_y_K_e_y_c_o_d_e_s, or a _B_a_d_V_a_l_u_e error results:
  143.  
  144.           first_keycode + num_codes - 1
  145.  
  146.           KeySym number N, counting from zero, for KeyCode K has the
  147.           following index in keysyms, counting from zero:
  148.  
  149.           (K - first_keycode) * keysyms_per_keycode + N
  150.  
  151.           The specified keysyms_per_keycode can be chosen arbitrarily
  152.           by the client to be large enough to hold all desired
  153.           symbols. A special KeySym value of _N_o_S_y_m_b_o_l should be used
  154.           to fill in unused elements for individual KeyCodes. It is
  155.           legal for _N_o_S_y_m_b_o_l to appear in nontrailing positions of the
  156.           effective list for a KeyCode.  _X_C_h_a_n_g_e_K_e_y_b_o_a_r_d_M_a_p_p_i_n_g
  157.           generates a _M_a_p_p_i_n_g_N_o_t_i_f_y event.
  158.  
  159.           There is no requirement that the X server interpret this
  160.           mapping. It is merely stored for reading and writing by
  161.           clients.
  162.  
  163.           _X_C_h_a_n_g_e_K_e_y_b_o_a_r_d_M_a_p_p_i_n_g can generate _B_a_d_A_l_l_o_c and _B_a_d_V_a_l_u_e
  164.           errors.
  165.  
  166.           The _X_G_e_t_K_e_y_b_o_a_r_d_M_a_p_p_i_n_g function returns the symbols for the
  167.           specified number of KeyCodes starting with first_keycode.
  168.           The value specified in first_keycode must be greater than or
  169.           equal to min_keycode as returned by _X_D_i_s_p_l_a_y_K_e_y_c_o_d_e_s, or a
  170.           _B_a_d_V_a_l_u_e error results.  In addition, the following
  171.           expression must be less than or equal to max_keycode as
  172.           returned by _X_D_i_s_p_l_a_y_K_e_y_c_o_d_e_s:
  173.  
  174.           first_keycode + keycode_count - 1
  175.  
  176.           If this is not the case, a _B_a_d_V_a_l_u_e error results. The
  177.           number of elements in the KeySyms list is:
  178.  
  179.           keycode_count * keysyms_per_keycode_return
  180.  
  181.           KeySym number N, counting from zero, for KeyCode K has the
  182.           following index in the list, counting from zero:
  183.           (K - first_code) * keysyms_per_code_return + N
  184.  
  185.           The X server arbitrarily chooses the
  186.           keysyms_per_keycode_return value to be large enough to
  187.           report all requested symbols. A special KeySym value of
  188.           _N_o_S_y_m_b_o_l is used to fill in unused elements for individual
  189.           KeyCodes.  To free the storage returned by
  190.           _X_G_e_t_K_e_y_b_o_a_r_d_M_a_p_p_i_n_g, use _X_F_r_e_e.
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))
  203.  
  204.  
  205.  
  206.           _X_G_e_t_K_e_y_b_o_a_r_d_M_a_p_p_i_n_g can generate a _B_a_d_V_a_l_u_e error.
  207.  
  208.           The _X_D_i_s_p_l_a_y_K_e_y_c_o_d_e_s function returns the min-keycodes and
  209.           max-keycodes supported by the specified display.  The
  210.           minimum number of KeyCodes returned is never less than 8,
  211.           and the maximum number of KeyCodes returned is never greater
  212.           than 255.  Not all KeyCodes in this range are required to
  213.           have corresponding keys.
  214.  
  215.           The _X_S_e_t_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g function specifies the KeyCodes of
  216.           the keys (if any) that are to be used as modifiers.  If it
  217.           succeeds, the X server generates a _M_a_p_p_i_n_g_N_o_t_i_f_y event, and
  218.           _X_S_e_t_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g returns _M_a_p_p_i_n_g_S_u_c_c_e_s_s.  X permits at
  219.           most 8 modifier keys.  If more than 8 are specified in the
  220.           _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure, a _B_a_d_L_e_n_g_t_h error results.
  221.  
  222.           The modifiermap member of the _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure
  223.           contains 8 sets of max_keypermod KeyCodes, one for each
  224.           modifier in the order _S_h_i_f_t, _L_o_c_k, _C_o_n_t_r_o_l, _M_o_d_1, _M_o_d_2,
  225.           _M_o_d_3, _M_o_d_4, and _M_o_d_5.  Only nonzero KeyCodes have meaning in
  226.           each set, and zero KeyCodes are ignored.  In addition, all
  227.           of the nonzero KeyCodes must be in the range specified by
  228.           min_keycode and max_keycode in the _D_i_s_p_l_a_y structure, or a
  229.           _B_a_d_V_a_l_u_e error results.
  230.  
  231.           An X server can impose restrictions on how modifiers can be
  232.           changed, for example, if certain keys do not generate up
  233.           transitions in hardware, if auto-repeat cannot be disabled
  234.           on certain keys, or if multiple modifier keys are not
  235.           supported. If some such restriction is violated, the status
  236.           reply is _M_a_p_p_i_n_g_F_a_i_l_e_d, and none of the modifiers are
  237.           changed.  If the new KeyCodes specified for a modifier
  238.           differ from those currently defined and any (current or new)
  239.           keys for that modifier are in the logically down state,
  240.           _X_S_e_t_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g returns _M_a_p_p_i_n_g_B_u_s_y, and none of the
  241.           modifiers is changed.
  242.  
  243.           _X_S_e_t_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g can generate _B_a_d_A_l_l_o_c and _B_a_d_V_a_l_u_e
  244.           errors.
  245.  
  246.           The _X_G_e_t_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g function returns a pointer to a
  247.           newly created _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure that contains the
  248.           keys being used as modifiers.  The structure should be freed
  249.           after use by calling _X_F_r_e_e_M_o_d_i_f_i_e_r_m_a_p.  If only zero values
  250.           appear in the set for any modifier, that modifier is
  251.           disabled.
  252.  
  253.           The _X_N_e_w_M_o_d_i_f_i_e_r_m_a_p function returns a pointer to
  254.           _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure for later use.
  255.  
  256.           The _X_I_n_s_e_r_t_M_o_d_i_f_i_e_r_m_a_p_E_n_t_r_y function adds the specified
  257.           KeyCode to the set that controls the specified modifier and
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 4/30/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))XXXXCCCChhhhaaaannnnggggeeeeKKKKeeeeyyyybbbbooooaaaarrrrddddMMMMaaaappppppppiiiinnnngggg((((3333XXXX11111111))))
  269.  
  270.  
  271.  
  272.           returns the resulting _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure (expanded as
  273.           needed).
  274.  
  275.           The _X_D_e_l_e_t_e_M_o_d_i_f_i_e_r_m_a_p_E_n_t_r_y function deletes the specified
  276.           KeyCode from the set that controls the specified modifier
  277.           and returns a pointer to the resulting _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p
  278.           structure.
  279.  
  280.           The _X_F_r_e_e_M_o_d_i_f_i_e_r_m_a_p function frees the specified
  281.           _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure.
  282.  
  283.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  284.           The _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure contains:
  285.  
  286.           typedef struct {
  287.                int max_keypermod;  /* This server's max number of keys per modifier */
  288.                KeyCode *modifiermap;/* An 8 by max_keypermod array of the modifiers */
  289.           } XModifierKeymap;
  290.  
  291.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  292.           _B_a_d_A_l_l_o_c  The server failed to allocate the requested
  293.                     resource or server memory.
  294.  
  295.           _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of
  296.                     values accepted by the request.  Unless a specific
  297.                     range is specified for an argument, the full range
  298.                     defined by the argument's type is accepted.  Any
  299.                     argument defined as a set of alternatives can
  300.                     generate this error.
  301.  
  302.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  303.           XFree(3X11), XSetPointerMapping(3X11)
  304.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 4/30/98)
  328.  
  329.  
  330.  
  331.